package Candidate;

import java.util.Scanner;
public class Candidate {
	Scanner kb = new Scanner (System.in);
	private long m,m1,m2,code,year;
	private String name,date;
	Candidate(){
		m=m1=m2=code=0;
	}
	Candidate(long mark,long mark1,long mark2,long codeID){
		this.m=mark;
		this.m1=mark;
		this.m2=mark;
		this.code=codeID;
	}
	public void input(){
		System.out.print("enters your name:");
		name=kb.next();
		System.out.print("enters your date of birth:");
		this.date=kb.next();
		System.out.print("enters your year of birth:");
		this.year=kb.nextLong();
		System.out.print("enters your codeID:");
		code=kb.nextLong();
		System.out.print("enters your mark1:");
		m1=kb.nextLong();
		System.out.print("enters your mark2:");
		m2=kb.nextLong();
		System.out.print("enters your mark:");
		m=kb.nextLong();
	}
	public boolean check(Candidate f){
		if(this.year>f.year)
			return true;
		return false;
				
	}
	public double average(){
		return (((this.m1 + this.m2)/2) + (this.m *2))/3;
	}
	public boolean max(Candidate f1){
		if(this.average()>f1.average())
			return true;
		return false;
	}
	public void output(){
		System.out.println("*******************************************");
		System.out.println("*******************************************");
		System.out.println("your codeID:"+code);
		System.out.println("your name:"+name);
		System.out.println("your date of birth:"+date);
		System.out.println("your year of birth:"+year);
		System.out.println("your mark1:"+m1);
		System.out.println("your mark2:" +m2);
		System.out.println("your mark:"+m);
		System.out.println("your mark average:"+ average());
		
	}
	public void out(){
		if(average()<5) System.out.println("					FAIL");
		else{
			if(average()<7) System.out.println("				AVERAGE");
			else{
				if(average()<8) System.out.println("			FARILY GOOD");
				else System.out.println("						GOOD");
			}
		}
	}
}

